package com.xl.generator.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xl.generator.domain.CompetitionScheme;
import com.xl.generator.dto.CompetitionSchemeDto;
import com.xl.generator.mapper.CompetitionSchemeMapper;
import com.xl.generator.pojo.CompetitionDetail;
import com.xl.generator.service.CompetitionSchemeService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
* @author Nannan
* @description 针对表【competition_scheme】的数据库操作Service实现
* @createDate 2022-11-13 16:21:20
*/
@Service
public class CompetitionSchemeServiceImpl extends ServiceImpl<CompetitionSchemeMapper, CompetitionScheme>
    implements CompetitionSchemeService{
	@Resource
	private CompetitionSchemeMapper competitionSchemeMapper;
	@Override
	public List listAll(IPage<CompetitionScheme> choiceQuestion) {
		List<CompetitionDetail> competitionDetails = competitionSchemeMapper.listAll(choiceQuestion);
		return competitionDetails;
	}

	@Override
	public List<CompetitionSchemeDto> listByType(IPage<CompetitionScheme> choiceQuestion,Integer competitionId){
		List<CompetitionSchemeDto> competitionDetails = competitionSchemeMapper.listByType(choiceQuestion,competitionId);
		return competitionDetails;
	}
}




